<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="/struts-tags" prefix="s" %> 

<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<base href="<%=basePath%>" />
		<meta name="viewport"
			content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
		<title>报名系统登陆</title><%@include file="res.jsp"%><script
			src="js/plugins/iealert/iealert.js" type="text/javascript"></script>
		<link rel="stylesheet" type="text/css"
			href="js/plugins/iealert/style.css" />
		<script type="text/javascript">$(document).ready(function() {$("body").iealert();});</script>
	</head>
	<body onload="RefCode();">
		<div class="header">
			<a href="index.html" class="logo centralize"></a>
		</div> 
		<div class="login" id="wrap">
			<div class="wrap">
				<h1>
					注册
					<c:choose> 
						<c:when test="${regist_tip == 'has'}">
							<span style="color: red; font-size: 10px; font-weight: lighter;" style="color:red">
							 	邮箱已经存在
							</span>
						</c:when>
						<c:when test="${regist_tip == 'code'}">
							<span style="color: red; font-size: 10px; font-weight: lighter;" style="color:red">
							 	验证码不正确 ....
							</span>
						</c:when>
						<c:when test="${regist_tip == 'error'}">
							<span style="color: red; font-size: 10px; font-weight: lighter;" style="color:red">
							 	信息填写没有按要求,请按常规出牌
							</span> 
						</c:when>
					</c:choose>
					<span style="color: red; font-size: 10px; font-weight: lighter;" style="color:red"><s:fielderror fieldName="name"/></span>
					<span style="color: red; font-size: 10px; font-weight: lighter;" style="color:red"><s:fielderror fieldName="email"/></span>
					<span style="color: red; font-size: 10px; font-weight: lighter;" style="color:red"><s:fielderror fieldName="password"/></span>
				</h1>
				<form action="page/regist.action" method="POST" id="validate">
					<div class="row-fluid">
						<div class="input-prepend">
							<span class="add-on"><i class="icon-user"></i>
							</span>
							<input type="text" name="name" placeholder="用户名"
								class="validate[required],minSize[3],maxSize[10]" />
						</div>
						<div class="input-prepend">
							<span class="add-on"><i class="icon-envelope"></i>
							</span>
							<input type="text" name="email" placeholder="邮箱"
								class="validate[required],minSize[3]" />
						</div>
						<div class="dr">
							<span></span>
						</div>
						<div class="input-prepend">
							<span class="add-on"><i class="icon-exclamation-sign"></i>
							</span>
							<input type="text" id="password" name="password" placeholder="密码"
								class="validate[required],minSize[6]" />
						</div>
						<div class="input-prepend">
							<span class="add-on"><i class="icon-question-sign"></i>
							</span>
							<input type="text" name="rePassword" placeholder="再次输入密码"
								class="validate[required,equals[password]]" />
						</div>
						<div class="dr">
							<span></span>
						</div>
					</div>
					<div class="row-fluid">
						<div class="span12">
							<img alt="" onclick="RefCode();" id="checkNumberImage"
								style="cursor: pointer;" src="gloabl_code.jpg">
							<input type="text" style="width: 120px" name="code"
								placeholder="验证码" class="validate[required],min[3]" />
						</div>
					</div>
					<div class="row-fluid">
						<p></p>
						<div class="btn-group">
							<button class="btn btn-info" type="button"
								onclick="$('#validate').validationEngine('hide');">
								隐藏
							</button>
							<button class="btn btn-primary" type="submit">
								提交
							</button>
						</div>
					</div>
				</form>
				<div class="dr">
					<span></span>
				</div>
				<div class="row-fluid">
					<div class="span4">
						<button class="btn btn-block" onClick="document.location.href = '<%=basePath %>page/login_enter.action';">
							返回
						</button>
					</div>
				</div>
			</div>
		</div>
		 
	</body>
</html>